package com.anhry.app.safety.manage.oa.bean;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.anhry.app.safety.manage.system.bean.TbUser;

/**
 * 
 * @author chen
 * @date 2012-8-8
 */
@Entity
@Table(name="TB_OA_MAIL_USER")
@SequenceGenerator(name="TB_OA_MAIL_USER_SEQ", sequenceName="TB_OA_MAIL_USER_SEQ_DB", allocationSize=1)
public class TbOaMailUser implements java.io.Serializable {

	private Long id;
	private TbOaMail tbOaMail;
	private TbUser addresseeId;
	private TbUser ccId;
	private String isReturn;
	private String isRead;
	private Date readTime;
	private Date mailDate;
	private String isDele;
	private String isBack;
	private String isDrop;
	private String isNote;	//短信是否发送0：未发送1：已发送

	@Id
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="TB_OA_MAIL_USER_SEQ")
	@Column(name = "ID", precision = 11, scale = 0)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="MAIL_ID")
	public TbOaMail getTbOaMail() {
		return tbOaMail;
	}

	public void setTbOaMail(TbOaMail tbOaMail) {
		this.tbOaMail = tbOaMail;
	}

	@ManyToOne
	@JoinColumn(name="ADDRESSEE_ID")
	public TbUser getAddresseeId() {
		return addresseeId;
	}

	public void setAddresseeId(TbUser addresseeId) {
		this.addresseeId = addresseeId;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="CC_ID")
	public TbUser getCcId() {
		return ccId;
	}

	public void setCcId(TbUser ccId) {
		this.ccId = ccId;
	}

	@Column(name="IS_RETURN", length=1)
	public String getIsReturn() {
		return this.isReturn;
	}

	public void setIsReturn(String isReturn) {
		this.isReturn = isReturn;
	}

	@Column(name="IS_READ", length=1)
	public String getIsRead() {
		return this.isRead;
	}

	public void setIsRead(String isRead) {
		this.isRead = isRead;
	}

	@Column(name="READ_TIME")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getReadTime() {
		return this.readTime;
	}

	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}

	@Column(name="MAIL_DATE")
	@Temporal(TemporalType.TIMESTAMP)
	public Date getMailDate() {
		return mailDate;
	}

	public void setMailDate(Date mailDate) {
		this.mailDate = mailDate;
	}

	@Column(name="IS_DELE", length=1)
	public String getIsDele() {
		return this.isDele;
	}

	public void setIsDele(String isDele) {
		this.isDele = isDele;
	}

	@Column(name="IS_BACK", length=1)
	public String getIsBack() {
		return isBack;
	}

	public void setIsBack(String isBack) {
		this.isBack = isBack;
	}

	@Column(name="IS_DROP", length=1)
	public String getIsDrop() {
		return isDrop;
	}

	public void setIsDrop(String isDrop) {
		this.isDrop = isDrop;
	}

	@Column(name="IS_NOTE", length=1)
	public String getIsNote() {
		return isNote;
	}

	public void setIsNote(String isNote) {
		this.isNote = isNote;
	}

}